package com.jz.community.modulemine.utils;

public enum FileType
{
    JPEG("image", "jpeg"),
    JPG("image", "jpg"),
    PNG("image", "png"),
    GIF("image", "gif");

    public static final String DELIMITER = "/";
    public static final String SUFFIX_POINT = ".";
    private final String type;
    private final String subType;
    private final String mimeType;
    private final String extension;
    private final String suffix;


    FileType(String type, String subType)
    {
        this(type, subType, subType);
    }

    FileType(String type, String subType, String extension)
    {
        this.type = type;
        this.subType = subType;
        this.extension = extension;
        mimeType = type + DELIMITER + subType;
        this.suffix = SUFFIX_POINT + subType;
    }

    public String getType()
    {
        return type;
    }

    public String getSubType()
    {
        return subType;
    }

    public String getSuffix()
    {
        return suffix;
    }

    public String getExtension()
    {
        return extension;
    }

    public String mimeType()
    {
        return mimeType;
    }
}
